<?php

/**
 * This is the model class for table "sildes".
 *
 * The followings are the available columns in table 'sildes':
 * @property integer $id
 * @property string $name
 * @property string $description
 * @property integer $status
 * @property string $created
 *
 * The followings are the available model relations:
 * @property Products[] $products
 */
class ProductSlides extends SlidesBase
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return sildes the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('id',$this->id);
		$criteria->compare('title',$this->title,true);
		$criteria->compare('image',$this->image,true);
		$criteria->compare('description',$this->description,true);
		$criteria->compare('status',$this->status,true);
		$criteria->compare('created',$this->created,true);
		$criteria->compare('position',$this->position);
		$criteria->compare('product_id',$this->product_id);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}